<template>
    <div>
        <h1>{{msg}} -- {{this.id}}</h1>
    </div>
</template>

<script>

export default {
    props: ["id"],//接收夫组件的参数
    data(){
        return {
            msg: '我是子组件组件',
            name: '   jiachenglin   '
        }
    },
    created(){
        // console.log(this.id)
        console.log(this.name)

        console.log(this.name.trim())
        console.log(this.name.trimLeft())
        console.log(this.name.trimRight())
        
    },
    mounted(){
        
    },
    methods:{
        
    }
}
</script>

<style lang="scss" scoped>

</style>